package designPattern.Observer_delegate;

/**
 * <pre>类名: FundInvestor</pre>
 * <pre>描述: 基民（买基金的人）</pre>
 * <pre>版权: web_chen@163.com</pre>
 * <pre>日期: 2020/3/19 14:22</pre>
 * <pre>作者: chenwb</pre>
 */
public class FundInvestor extends DefaultDelegation {

	private String name;

	public FundInvestor(String name) {
		this.name = name;
	}

	/**
	 * @Description: 买基金
	 * @author chenwb
	 * @date 2020/3/19 14:22
	 */
	public void buyFund() {
		System.out.println(name + "买基金！");
		//委托事件 可以委托任何事件
		notifyOthers();
	}
}
